<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <title>分类 - Blog</title>
    <link rel="stylesheet" href="./static/layui/css/layui.css">
    <link rel="stylesheet" href="./static/css/common.css">
</head>
<body>
<header class="layui-bg-cyan">
    <nav class="layui-container">
        <div class="layui-row">
            <div class="layui-col-md2 logo">
                <a href="javascript:;"><img src="./static/images/logo.png"></a>
            </div>
            <div class="layui-col-md8 layui-hide-xs">
                <ul class="layui-nav layui-bg-cyan">
                    <li class="layui-nav-item">
                        <a href="index.html">首页</a>
                    </li>
                    <li class="layui-nav-item ">
                        <a href="caty.html?type=JavaSE" name="JavaSE">JavaSE</a>
                    </li>
                    <li class="layui-nav-item">
                        <a href="caty.html?type=DataBase" name="DataBase">DataBase</a>
                    </li>
                    <li class="layui-nav-item">
                        <a href="caty.html?type=jsp" name="JSP">jsp</a>
                    </li>
                    <li class="layui-nav-item">
                        <a href="caty.html?type=Frame" name="Frame">Frame</a>
                    </li>
                </ul>
            </div>
            <div class="layui-col-md2 layui-hide-xs userinfoBox">
                <ul class="layui-nav layui-bg-cyan">
                    <li class="layui-nav-item" lay-unselect="">
                        <a href="javascript:;"><img src="static/images/user01.png" class="layui-nav-img">Brother</a>
                        <dl class="layui-nav-child">
                            <dd><a href="main.html" class="layui-btn layui-btn-primary">返回后台</a></dd>

                            <dd><a href="login.html" class="layui-btn layui-btn-primary">退出登录</a></dd>
                        </dl>
                    </li>
                </ul>
            </div>
        </div>
    </nav>
</header>

<div class="layui-container">
    <div class="layui-row layui-col-space20">
        <div class="layui-col-md8">
            <div class="layui-row">
                <div class="layui-card">
                    <div class="layui-card-body">
					  		<span class="layui-breadcrumb">
							  	<a href="index.html">首页</a>
							  	<a><cite>JAVA基础</cite></a>
							</span>
                    </div>
                </div>

                <div class="layui-col-md12 margin20"></div>

                <div name="显示JAVA基础"></div>

                <div class="layui-col-md12 margin20"></div>
            </div>
        </div>
        <div class="layui-col-md4">
            <div class="layui-row">
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-header">
								<span class="layui-breadcrumb" lay-separator="|">
									<a href="javascript:;">联系站长</a>
								</span>
                        </div>
                        <div class="layui-card-body" id="binfo">
                            <table class="layui-table">
                                <colgroup>
                                    <col width="120">
                                    <col width="230">
                                </colgroup>
                                <tbody>
                                <tr>
                                    <td>QQ号：</td>
                                    <td>123456</td>
                                </tr>
                                <tr>
                                    <td>微信号：</td>
                                    <td>999999</td>
                                </tr>
                                <tr>
                                    <td>qq群号：</td>
                                    <td>1008611</td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md12 margin20"></div>
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-header">
								<span>
									热门文章
								</span>
                        </div>
                        <div class="layui-card-body">
                            <table class="layui-table" lay-skin="nob">
                                <tbody id="wenzhang">
                                <tr>
                                    <td><a href="detail.html">用SSM框架制作一个博客网站（响应式模板）</a></td>
                                </tr>
                                <tr>
                                    <td><a href="detail.html">用SSM框架制作一个博客网站（响应式模板）</a></td>
                                </tr>
                                <tr>
                                    <td><a href="detail.html">用SSM框架制作一个博客网站（响应式模板）</a></td>
                                </tr>
                                <tr>
                                    <td><a href="detail.html">用SSM框架制作一个博客网站（响应式模板）</a></td>
                                </tr>
                                <tr>
                                    <td><a href="detail.html">用SSM框架制作一个博客网站（响应式模板）</a></td>
                                </tr>
                                <tr>
                                    <td><a href="detail.html">用SSM框架制作一个博客网站（响应式模板）</a></td>
                                </tr>
                                <tr>
                                    <td><a href="detail.html">用SSM框架制作一个博客网站（响应式模板）</a></td>
                                </tr>
                                <tr>
                                    <td><a href="detail.html">用SSM框架制作一个博客网站（响应式模板）</a></td>
                                </tr>
                                <tr>
                                    <td><a href="detail.html">用SSM框架制作一个博客网站（响应式模板）</a></td>
                                </tr>
                                <tr>
                                    <td><a href="detail.html">用SSM框架制作一个博客网站（响应式模板）</a></td>
                                </tr>
                                <tr>
                                    <td><a href="detail.html">用SSM框架制作一个博客网站（响应式模板）</a></td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
                <div class="layui-col-md12 margin20"></div>
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-header">
								<span>
									捐助本站
								</span>
                        </div>
                        <div class="layui-card-body" style="text-align: center;">
                            <img src="static/images/qr.png" style="display: inline-block;">
                            <br/>
                            <p>无论多少，都是心意!</p>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 尾部 -->
<div class="footer"></div>
<footer class="layui-bg-cyan">
    <div class="layui-container">
        <div class="layui-row">
        </div>
    </div>
</footer>
</body>
<script src="./static/layui/layui.all.js"></script>
<script type="text/javascript" src="./static/js/jquery-1.12.4.min.js"></script>


<script>
    layui.carousel.render({
        elem: '#carousel'
        , width: '100%' //设置容器宽度
        , arrow: 'always' //始终显示箭头
        //,anim: 'updown' //切换动画方式
    });
    $(function () {
        function getUrlParam(name) {
            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
            var r = window.location.search.substr(1).match(reg);  //匹配目标参数
            if (r != null) return unescape(r[2]);
            return null; //返回参数值
        }

        //alert(getUrlParam("type"));
    });
</script>

<script type="text/javascript">
    //窗体加载
    $(document).ready(function () {
        var java=sessionStorage.getItem("type");
        $.get("Blog/showJava",{"type":java},function (rs) {
            show(rs);
        });
        function show(rs) {
            $("div[name=\"显示JAVA基础\"]").empty();
            var blog=rs.result;
            for(var i=0;i<blog.length;i++){
                $("<div class=\"layui-col-md12\">\n" +
                    "                    <div class=\"main list\">\n" +
                    "                        <div class=\"subject\"><a href=\"caty.html?type=JavaSE\" class=\"caty\">["+blog[i].type+"]</a><a href=\"detail.html\"\n" +
                    "                                                                                             title=\"用SSM框架制作一个博客网站（响应式模板）\">"+blog[i].title+"</a><em>" +
                    "                            "+blog[i].posttime+"</em></div>\n" +
                    "                        <div class=\"content layui-row\">\n" +
                    "                            <div class=\"layui-col-md4 list-img\">\n" +
                    "                                <a href=\"javascript:;\"><img src=\"./static/images/list_img.png\"></a>\n" +
                    "                            </div>\n" +
                    "                            <div class=\"layui-col-md8\">\n" +
                    "                                <div class=\"list-text\">"+blog[i].detail+"\n" +
                    "                                </div>\n" +
                    "                                <div class=\"list-stat layui-row\">\n" +
                    "\n" +
                    "                                    <div class=\"layui-col-xs3 layui-col-md3 Label\">\n" +
                    "                                        <i class=\"layui-icon layui-icon-note\"></i>\n" +
                    "                                        <a href=\"caty.html?type=JavaSE\">"+blog[i].type+"</a>\n" +
                    "\n" +
                    "                                    </div>\n" +
                    "                                    <div class=\"layui-col-xs3 layui-col-md3\">\n" +
                    "                                        <i class=\"layui-icon layui-icon-read\"></i>\n" +
                    "                                        <em>"+blog[i].clicknumber+"</em>\n" +
                    "                                    </div>\n" +
                    "\n" +
                    "                                    <div class=\"layui-col-xs3 layui-col-md3 alink\">\n" +
                    "                                        <a id='clicknumber' data-value='"+blog[i].blogid+"' href='detail.html?blogid="+blog[i].blogid+"&type="+blog[i].type+"' class=\"layui-btn layui-btn-xs\">阅读原文</a>\n" +
                    "                                    </div>\n" +
                    "                                </div>\n" +
                    "                            </div>\n" +
                    "                        </div>\n" +
                    "                    </div>\n" +
                    "                </div>"+
                    "             <div class=\"layui-col-md12 margin20\"></div>").appendTo("div[name='显示JAVA基础']");
            }
        }
        $("a[name='JavaSE']").click(function () {
            var JavaSE=$(this).attr("name");
            sessionStorage.clear();
            sessionStorage.setItem("type",JavaSE);
            window.location.href="http://127.0.0.1:8080/caty.html?type="+JavaSE;
        });

        $("a[name='DataBase']").click(function () {
            var DataBase=$(this).attr("name");
            sessionStorage.clear();
            sessionStorage.setItem("type",DataBase);
            window.location.href="http://127.0.0.1:8080/caty.html?type="+DataBase;
        });
        $("a[name='JSP']").click(function () {
            var jsp=$(this).attr("name");
            sessionStorage.clear();
            sessionStorage.setItem("type",jsp);
            window.location.href="http://127.0.0.1:8080/caty.html?type="+jsp;
        });
        $("a[name='Frame']").click(function () {
            var Frame=$(this).attr("name");
            sessionStorage.clear();
            sessionStorage.setItem("type",Frame);
            window.location.href="http://127.0.0.1:8080/caty.html?type="+Frame;
        });
    });

    $(document).ready(function () {
        <!--侧边热门文章列表展示，点击跳转附带blogid和type-->
        $.get("Blog/showByClickNumber",function (rs) {
            JSON.stringify(rs);
            var wos = rs.result;
            $("[id='wenzhang']").empty();
            for (var i = 0; i < wos.length; i++) {

                $("<tr>\n" +
                    "<td id='clicknumber' data-value='" + wos[i].blogid + "'><a href='detail.html?blogid=" + wos[i].blogid + "&type=" + wos[i].type + "'>" + wos[i].title + "</a></td>\n" +
                    "</tr>").appendTo("[id='wenzhang']");
            }
        });


    });

    /*设置点击事件，点击热门文章时获取blodid，并使点击数加1*/
    $(document).on("click","#clicknumber",function () {
        var blogid=$(this).data("value");
        $.get("Blog/updateClickNumber",{"blogid":blogid},function () {
        });
    });


</script>

<script type="text/javascript">




</script>




</html>



